﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using PrinterBudi.Persistence;

namespace PrinterBudi.Desktop
{
    public partial class FormMain : Form
    {
        PBEmployee employeeActive;

        public FormMain(PBEmployee eNow)
        {
            employeeActive = eNow;
            InitializeComponent();
        }

        public FormMain()
        {
            InitializeComponent();
        }

        private void btnUser_Click(object sender, EventArgs e)
        {
            FormPBUser frm = new FormPBUser();
            this.Hide();
            frm.ShowDialog();

            this.Show();
            this.Activate();
        }

        private void btnEmployee_Click(object sender, EventArgs e)
        {
            FormPBEmployee frm = new FormPBEmployee(employeeActive);
            this.Hide();
            frm.ShowDialog();

            this.Show();
            this.Activate();
        }

        private void btnTransaction_Click(object sender, EventArgs e)
        {
            FormPBTransaction frm = new FormPBTransaction(employeeActive);
            this.Hide();
            frm.ShowDialog();

            this.Show();
            this.Activate();
        }

        private void btnClose_Click(object sender, EventArgs e)
        {
            this.Close();
        }

    }
}

